package com.luo.partner.dao.model;

import java.io.Serializable;
import java.math.BigDecimal;

public class TabRed implements Serializable {
    /**
     * 红包ID
     *
     * @mbggenerated
     */
    private Integer redId;

    /**
     * 红包名称
     *
     * @mbggenerated
     */
    private String redName;

    /**
     * 红包额度
     *
     * @mbggenerated
     */
    private BigDecimal amount;

    /**
     * 描述
     *
     * @mbggenerated
     */
    private String description;

    /**
     * 下限
     *
     * @mbggenerated
     */
    private BigDecimal lowerLimit;

    /**
     * 上限
     *
     * @mbggenerated
     */
    private BigDecimal upLimit;

    /**
     * 状态,1.正常 0.禁用
     *
     * @mbggenerated
     */
    private Integer state;

    /**
     * 合伙人userId
     *
     * @mbggenerated
     */
    private Long userId;

    /**
     * 设置类型，0表示按上下限，1表示按充值金额的百分比
     *
     * @mbggenerated
     */
    private Integer setType;

    /**
     * 充值金额的百分比0-100
     *
     * @mbggenerated
     */
    private BigDecimal rate;

    private static final long serialVersionUID = 1L;

    public Integer getRedId() {
        return redId;
    }

    public void setRedId(Integer redId) {
        this.redId = redId;
    }

    public String getRedName() {
        return redName;
    }

    public void setRedName(String redName) {
        this.redName = redName;
    }

    public BigDecimal getAmount() {
        return amount;
    }

    public void setAmount(BigDecimal amount) {
        this.amount = amount;
    }

    public String getDescription() {
        return description;
    }

    public void setDescription(String description) {
        this.description = description;
    }

    public BigDecimal getLowerLimit() {
        return lowerLimit;
    }

    public void setLowerLimit(BigDecimal lowerLimit) {
        this.lowerLimit = lowerLimit;
    }

    public BigDecimal getUpLimit() {
        return upLimit;
    }

    public void setUpLimit(BigDecimal upLimit) {
        this.upLimit = upLimit;
    }

    public Integer getState() {
        return state;
    }

    public void setState(Integer state) {
        this.state = state;
    }

    public Long getUserId() {
        return userId;
    }

    public void setUserId(Long userId) {
        this.userId = userId;
    }

    public Integer getSetType() {
        return setType;
    }

    public void setSetType(Integer setType) {
        this.setType = setType;
    }

    public BigDecimal getRate() {
        return rate;
    }

    public void setRate(BigDecimal rate) {
        this.rate = rate;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", redId=").append(redId);
        sb.append(", redName=").append(redName);
        sb.append(", amount=").append(amount);
        sb.append(", description=").append(description);
        sb.append(", lowerLimit=").append(lowerLimit);
        sb.append(", upLimit=").append(upLimit);
        sb.append(", state=").append(state);
        sb.append(", userId=").append(userId);
        sb.append(", setType=").append(setType);
        sb.append(", rate=").append(rate);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        TabRed other = (TabRed) that;
        return (this.getRedId() == null ? other.getRedId() == null : this.getRedId().equals(other.getRedId()))
            && (this.getRedName() == null ? other.getRedName() == null : this.getRedName().equals(other.getRedName()))
            && (this.getAmount() == null ? other.getAmount() == null : this.getAmount().equals(other.getAmount()))
            && (this.getDescription() == null ? other.getDescription() == null : this.getDescription().equals(other.getDescription()))
            && (this.getLowerLimit() == null ? other.getLowerLimit() == null : this.getLowerLimit().equals(other.getLowerLimit()))
            && (this.getUpLimit() == null ? other.getUpLimit() == null : this.getUpLimit().equals(other.getUpLimit()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getUserId() == null ? other.getUserId() == null : this.getUserId().equals(other.getUserId()))
            && (this.getSetType() == null ? other.getSetType() == null : this.getSetType().equals(other.getSetType()))
            && (this.getRate() == null ? other.getRate() == null : this.getRate().equals(other.getRate()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getRedId() == null) ? 0 : getRedId().hashCode());
        result = prime * result + ((getRedName() == null) ? 0 : getRedName().hashCode());
        result = prime * result + ((getAmount() == null) ? 0 : getAmount().hashCode());
        result = prime * result + ((getDescription() == null) ? 0 : getDescription().hashCode());
        result = prime * result + ((getLowerLimit() == null) ? 0 : getLowerLimit().hashCode());
        result = prime * result + ((getUpLimit() == null) ? 0 : getUpLimit().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getUserId() == null) ? 0 : getUserId().hashCode());
        result = prime * result + ((getSetType() == null) ? 0 : getSetType().hashCode());
        result = prime * result + ((getRate() == null) ? 0 : getRate().hashCode());
        return result;
    }
}